﻿CREATE PROCEDURE sec_Menu_Level0_XML
AS

DECLARE @MENU_LABEL sysname
SET @MENU_LABEL = 'ddMenu_'

SELECT 1 as Tag,NULL as Parent,
	MenuName as [cool:button!1],
	'coolbutton' as [cool:button!1!class],
--	IsDefault as [cool:button!1!showMe],
	'btnCool' as [cool:button!1!id],
	'showAround=function(){};try{hideMenu()}catch(e){}' as [cool:button!1!onmouseover],
	'return(event.ctrlKey)' as [cool:button!1!oncontextmenu],
	'VERTICAL-ALIGN: middle;cursor:hand;cb--selected-background:menu;font-family:tahoma;font-weight:bold;padding:3px;padding-left:5px;padding-right:5px;'+
		ISNULL(Style,'') as [cool:button!1!style],
	'showAround=function(){};showMainSubMenu("'+@MENU_LABEL+CAST(ParentMenuID as sysname)+'",'+Object+')' as [cool:button!1!onclick]
	
FROM v_Menu_Level_0
INNER JOIN dbo.fs_StateID(DEFAULT,128) fs_Menu ON v_Menu_Level_0.ParentMenuID = fs_Menu.ID
ORDER BY v_Menu_Level_0.TabIndex
FOR XML EXPLICIT





